public class ComputerStore
{
    public static void main(String[] args)
    {
        Component components1[] =
                {       new CPU("CPU", "Intel", 1300, 4),
                        new Memory("Memory", "Samsung", 400, "8GiB"),
                        new Disk("Disk", "Seagate", 500, "1T"),
                        new Motherboard("Motherboard", "Asus", 700, "300MHz")
                };
        Computer PC1 = new Computer("ASUS PC", components1);
        Component components2[] =
                {       new CPU("CPU", "Intel", 1700, 6),
                        new Memory("Memory", "Kingston", 400, "8GiB"),
                        new Disk("Disk", "Seagate", 700, "2T"),
                        new Motherboard("Motherboard", "Asus", 900, "500MHz")
                };
        Computer PC2 = new Computer("ASUS PC", components2);
        Component components3[] =
                {       new CPU("CPU", "AMD", 1400, 6),
                        new Memory("Memory", "Samsung", 400, "8GiB"),
                        new Disk("Disk", "WestDigitals", 550, "1T"),
                        new Motherboard("Motherboard", "Gigabyte", 800, "400MHz")
                };
        Computer PC3 = new Computer("Gigabyte PC", components3);
        Computer PCs[] = {PC1, PC2, PC3};
        for (int i = 0; i < PCs.length; i++)
        {
            System.out.println(PCs[i].getInfo());
            System.out.println("计算机运行：");
            System.out.println(PCs[i].work());
        }
    }
}
